In the past, conventional image recording equipment records images on magnetic tapes. Tapes have finite recording capacity and times. When the conventional tape image recording equipment has recorded images for a long time, a current image may overwrites one previously-recorded image, or when the tape has repeatedly been used, the current image recorded in the tape may be declined. Compared with the conventional image recording equipment, the digital image recording equipment records digital image data in a digital storage device. Therefore, when the digital storage device is repeatedly being used, the digital image data will not be declined. Moreover, image files stored in the digital storage device can be made into lots of copies, and the digital storage device costs less than tapes. Thus, the digital recording equipment is widely applied to various application fields such as home care, security surveillance or vehicle video recording.
Nevertheless, if the digital recording equipment uses a flash memory as its storage device and repeatedly uses the memory blocks of the flash memory, the memory blocks may have faults. For example, a conventional flash memory 120 in FIG. 1 generally has many memory blocks 121 used for storing digital data. When the memory blocks 121 are accessed many times, it is easy for the memory blocks 121 to have faults. These memory blocks 121 having faults are called bad blocks or faulty blocks 122.
In order to avoid writing the image data into the faulty blocks 122, a controller in the flash memory 120, in real time, detects whether the memory block which data is being written to is faulty or not during the data writing. If the memory block is faulty, the controller will find a non-faulty block to logically “replace” the faulty block and write the data into the non-faulty block. Specifically, the faulty blocks are generated more frequent when the recording equipment is used by cyclic recording application then by other applications. However, if the flash memory has run out of capacity and some memory blocks are faulty, the controller in the flash memory 120 will not be able to find available memory blocks to logically “replace” these faulty blocks. Even though the original image data 110 can be written into the flash memory 120, the image data stored in the flash memory will not be the same as the original image data 110. It will be difficult to be read out. Even if the image data stored in the flash memory 120 can be read out, the read-out data will be erroneous, e.g. represented by the dotted-line rectangular in the image data 130 shown in FIG. 1. The image data 130 will not be able to be played, or some part of the displayed image will be wrong or missing.